/**
 * Created with CLion.
 * Description: 
 * User: loong
 * Date: 2021-01-03
 * Time: 11:16
 */
#include <QtWidgets>

int main(int argc ,char *argv[]){
    QApplication a(argc, argv);
    QMainWindow * mainWindow = new QMainWindow();
    mainWindow->resize(300,300);
    mainWindow->show();

    QRect rect = QApplication::desktop()->availableGeometry();
    const int &endy = rect.height() - mainWindow->height();
    QPropertyAnimation *animation= new QPropertyAnimation(mainWindow,"pos");
    animation->setDuration(2000);
    animation->setStartValue(QPoint(rect.width() - mainWindow->width(), rect.height()));
    animation->setEndValue(QPoint(rect.width() - mainWindow->width(), endy));
    animation->setEasingCurve(QEasingCurve::OutCubic);
    animation->start(QAbstractAnimation::DeleteWhenStopped);

    QPropertyAnimation* animation1 = new QPropertyAnimation(mainWindow, "windowOpacity");
    animation1->setDuration(1000);
    animation1->setStartValue(0);
    animation1->setEndValue(1);
    animation1->setEasingCurve(QEasingCurve::OutCirc);
    animation1->start(QAbstractAnimation::DeleteWhenStopped);







    return a.exec();
}